function jumpPage(name,menu) {
	window.location.href = name + ".jsp?menu="+ menu;
}

function jumpPage2(name) {
	window.location.href = name + ".jsp";
}

function returnDate(dateTime) {
	var t = new Date(dateTime.replace(/-/g, "/"));
	var year = t.getFullYear();
	var month = t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1)
			: t.getMonth() + 1;
	var date = t.getDate() < 10 ? "0" + t.getDate() : t.getDate();
	var hour = t.getHours() < 10 ? "0" + t.getHours() : t.getHours();
	var minute = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes();
	var second = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
	return month + "/" + date + " " + hour + ":" + minute;
}

function returnDateYMD(dateTime) {
	var t = new Date(dateTime.replace(/-/g, "/"));
	var year = t.getFullYear();
	var month = t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1)
			: t.getMonth() + 1;
	var date = t.getDate() < 10 ? "0" + t.getDate() : t.getDate();
	var hour = t.getHours() < 10 ? "0" + t.getHours() : t.getHours();
	var minute = t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes();
	var second = t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds();
	return year + "/" + month + "/" + date;
}

function getLocalTime(nS) {
	return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,
			' ').substring(0, 10);
}

function add0(m) {
	return m < 10 ? '0' + m : m;
}
function formatDate(shijianchuo) {
	// shijianchuo是整数，否则要parseInt转换
	var time = new Date(shijianchuo);
	var y = time.getFullYear();
	var m = time.getMonth() + 1;
	var d = time.getDate() + 1;
	var h = time.getHours() + 1;
	var mm = time.getMinutes() + 1;
	var s = time.getSeconds() + 1;
	return y + '-' + add0(m) + '-' + add0(d);
}


function locatAmi(objId){
	$("html,body").animate({scrollTop: $("#"+objId).offset().top}, 600); //一秒跳转到该ID的位置
}